<?php
	$con = mysql_connect("localhost:3306","root","shibani");
	if (!$con)
	{
		die('Could not connect: ' . mysql_error());
	}

	mysql_select_db("cal2sync", $con);

	$result = mysql_query("SELECT password FROM user WHERE username = '".$_POST['username']."'");
	
	while($row = mysql_fetch_array($result))
	{
		$pass = $row['password'];
	}
	if((strcasecmp($pass,$_POST['password']))==0)
		$ans=1;
	else
		$ans=0;
		
	//HttpResponse::setContentType('text/xml');
	//HttpResponse::setData($ans);
    	
	mysql_close($con);
	//return $ans;
	//HttpResponse::send();
	echo $ans;
?>